<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('核销报单数据管理')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-declaration-chargeOff" th:object="${declaration}">
        <input name="decId" th:field="*{decId}" type="hidden">
        <!--        <div class="form-group">-->
        <!--            <label class="col-sm-3 control-label is-required">报单编号：</label>-->
        <!--            <div class="col-sm-8">-->
        <!--                <input name="decNo" th:field="*{decNo}" class="form-control" type="text" required>-->
        <!--            </div>-->
        <!--        </div>-->
        <!--            <div class="form-group">    -->
        <!--                <label class="col-sm-3 control-label">活动编号：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <input name="decActivityNo" th:field="*{decActivityNo}" class="form-control" type="text">-->
        <!--                </div>-->
        <!--            </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">活动名称：</label>
            <div class="col-sm-8">
                <select name="decActivityName" class="form-control m-b" th:with="type=${@dict.getActivity()}">
                    <option th:each="dict : ${type}" th:text="${dict.getActName()}"
                            th:value="${dict.getActName()}"></option>
                </select></div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">报单状态：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('sys_oper_dec_status')}">
                    <input type="radio" th:id="${'decStatus_' + dict.dictCode}" name="decStatus"
                           th:value="${dict.dictValue}" th:field="*{decStatus}">
                    <label th:for="${'decStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">奖品：</label>
            <div class="col-sm-8">
                <input name="decGift" th:field="*{decGift}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input name="decRemark" th:field="*{decRemark}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/declaration";
    $("#form-declaration-chargeOff").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/chargeOff", $('#form-declaration-chargeOff').serialize());
        }
    }
</script>
</body>
</html>